<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="ctx/ctx.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>八大员听课</title>
  </head>
  <body>
  	<center>
  		<a href="${ctx }/xuanxiu" style="padding-right: 30px">选修</a>
  		<a href="${ctx }/bixiu" style="padding-right: 30px">必修</a>
	  	<a href="${ctx }/anguan" style="padding-right: 30px">安管</a>
  	</center>
  	<div style="height: 30px"></div>
  	
  	<center><h3>八大员听课</h3></center>
    <form action="login" name="lgoin" id="login" method="post">
    	<table align="center" border="0">
    		<tr height="40px">
    			<td align="right" width="120px;">用户名：</td>
    			<td><input type="text" name="txtUserName"></td>
    		</tr>
    		<tr>
    			<td align="right" width="120px;"> 密码：</td>
    			<td> <input type="password" name="txtPwd" value="888888"></td>
    		</tr>
    		<tr height="40px">
    			<td align="right" width="120px;">八大员类型：</td>
    			<td>
    			<select name="ZY">
    				<option value="1">施工员</option>
    				<option value="10">土建施工员</option>
    				<option value="11">装饰装修施工员</option>
    				<option value="12">设备安装施工员</option>
    				<option value="13">市政工程施工员</option>
    				<option value="2">标准员</option>
    				<option value="3">材料员</option>
    				<option value="4">机械员</option>
    				<option value="5" selected="selected">安全员</option>
    				<option value="6">资料员</option>
    				<option value="70">土建质量员</option>
					<option value="71">装饰装修质量员</option>
					<option value="72">设备安装质量员</option>
					<option value="73">市政工程质量员</option>
    				<option value="8">劳务员</option>
    			</select> </td>
    		</tr>
    		<tr height="40px">
    			<td align="right" width="120px;">节数：</td>
    			<td>开始
    			<select name="numBegin" id="num1">
    				<option value="1">1</option>
    				<option value="2">2</option>
    				<option value="3">3</option>
    				<option value="4">4</option>
    				<option value="5">5</option>
    				<option value="6">6</option>
    				<option value="7">7</option>
    				<option value="8">8</option>
    				<option value="9">9</option>
    				<option value="10" >10</option>
    				<option value="11">11</option>
    				<option value="12">12</option>
    				<option value="13">13</option>
    				<option value="14">14</option>
    				<option value="15">15</option>
    				<option value="16">16</option>
    				<option value="17">17</option>
    				<option value="18">18</option>
    				<option value="19">19</option>
    				<option value="20">20</option>
    				<option value="21">21</option>
    				<option value="22">22</option>
    				<option value="23">23</option>
    				<option value="24">24</option>
    				<option value="25">25</option>
    				<option value="26">26</option>
    				<option value="27">27</option>
    				<option value="28">28</option>
    				<option value="29">29</option>
    				<option value="30">30</option>
    			</select>—结束
    			<select name="numEnd" id="num2">
    				<option value="1">1</option>
    				<option value="2">2</option>
    				<option value="3">3</option>
    				<option value="4">4</option>
    				<option value="5">5</option>
    				<option value="6">6</option>
    				<option value="7">7</option>
    				<option value="8">8</option>
    				<option value="9">9</option>
    				<option value="10" selected="selected">10</option>
    				<option value="11">11</option>
    				<option value="12">12</option>
    				<option value="13">13</option>
    				<option value="14">14</option>
    				<option value="15">15</option>
    				<option value="16">16</option>
    				<option value="17">17</option>
    				<option value="18">18</option>
    				<option value="19">19</option>
    				<option value="20">20</option>
    				<option value="21">21</option>
    				<option value="22">22</option>
    				<option value="23">23</option>
    				<option value="24">24</option>
    				<option value="25">25</option>
    				<option value="26">26</option>
    				<option value="27">27</option>
    				<option value="28">28</option>
    				<option value="29">29</option>
    				<option value="30">30</option>
    			</select> 
    			</td>
    		</tr>
    		<tr height="50px">
    			<td colspan="2" align="center">
    				<input type="button" value="一键听课" id="btn" onclick="toLogin()">
    			</td>
    		</tr>
    	</table>
    </form>
    <script type="text/javascript">
    function toLogin(){
    	var obj1 = document.getElementById("num1");
    	var num1 = obj1.options[obj1.selectedIndex].value;
    	var obj2 = document.getElementById("num2");
    	var num2 = obj2.options[obj2.selectedIndex].value;
    	if(parseInt(num2) < parseInt(num1)){
    		alert("听课结束课数不能小于开始课数!");
    		return ;
    	}
    	document.getElementById('login').submit();
    }
   	 
    </script>
  </body>
</html>
